package cn.miju.admin.biz.controller;

import cn.miju.admin.biz.service.PayOrderService;
import cn.miju.admin.biz.vo.PayOrderPageInVO;
import cn.miju.admin.biz.vo.PayOrderPageOutVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <pre>
 * 支付订单管理
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-04-07 11:35
 */
@RestController
@Api(tags = "业务-订单管理")
@ApiSort(101)
@RequestMapping("/biz/order")
public class PayOrderController {
    private final PayOrderService service;

    public PayOrderController(PayOrderService service) {
        this.service = service;
    }

    /**
     * 支付订单分页查询
     * @param inVO {@link PayOrderPageInVO}
     * @return {@link Page<PayOrderPageOutVO>}
     */
    @ApiOperation("支付订单分页查询")
    @ApiOperationSupport(order = 1, author = "zhuming")
    @GetMapping("/page")
    public Page<PayOrderPageOutVO> getPage(@ModelAttribute @Validated PayOrderPageInVO inVO) {
        return service.getPage(inVO);
    }
}
